<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  
    
      
    

    
  

  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="随笔,life,年终总结," />










<meta name="description" content="前言前面一段时间看了一篇文章，有提到每过一段时间就要对自己进行一个总结，这样才能更好地总结过去拥抱未来。我觉得很有道理，因此决定往后每年都进行一次年终总结，一是总结自己一年中的成长与得失，二是对后面的一年进行期望与规划。 关于2018年1. 技术方面算是打好了JavaScript的基础，并对react也进行了一个较为深入的学习，但这两者都还是需要继续努力。此外也对Angular进行了一些了解，算是">
<meta name="keywords" content="随笔,life,年终总结">
<meta property="og:type" content="article">
<meta property="og:title" content="关于2018，我有这些想谈谈的">
<meta property="og:url" content="http://srtian96.gitee.io/blog/2018/12/17/关于2018，我有这些想谈谈的/index.html">
<meta property="og:site_name" content="Srtian&#39;Blog">
<meta property="og:description" content="前言前面一段时间看了一篇文章，有提到每过一段时间就要对自己进行一个总结，这样才能更好地总结过去拥抱未来。我觉得很有道理，因此决定往后每年都进行一次年终总结，一是总结自己一年中的成长与得失，二是对后面的一年进行期望与规划。 关于2018年1. 技术方面算是打好了JavaScript的基础，并对react也进行了一个较为深入的学习，但这两者都还是需要继续努力。此外也对Angular进行了一些了解，算是">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://images.gitee.com/uploads/images/2018/1214/225238_8c7c3e13_1575229.jpeg">
<meta property="og:image" content="https://images.gitee.com/uploads/images/2018/1214/225349_ffec87cc_1575229.jpeg">
<meta property="og:updated_time" content="2019-01-02T10:17:26.761Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="关于2018，我有这些想谈谈的">
<meta name="twitter:description" content="前言前面一段时间看了一篇文章，有提到每过一段时间就要对自己进行一个总结，这样才能更好地总结过去拥抱未来。我觉得很有道理，因此决定往后每年都进行一次年终总结，一是总结自己一年中的成长与得失，二是对后面的一年进行期望与规划。 关于2018年1. 技术方面算是打好了JavaScript的基础，并对react也进行了一个较为深入的学习，但这两者都还是需要继续努力。此外也对Angular进行了一些了解，算是">
<meta name="twitter:image" content="https://images.gitee.com/uploads/images/2018/1214/225238_8c7c3e13_1575229.jpeg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://srtian96.gitee.io/blog/2018/12/17/关于2018，我有这些想谈谈的/"/>





  <title>关于2018，我有这些想谈谈的 | Srtian'Blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Srtian'Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">It's better to burn out than to fade away</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://srtian96.gitee.io/blog/blog/2018/12/17/关于2018，我有这些想谈谈的/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Srtian">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Srtian'Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">关于2018，我有这些想谈谈的</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-12-17T23:31:35+08:00">
                2018-12-17
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/随笔/" itemprop="url" rel="index">
                    <span itemprop="name">随笔</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv">本文总阅读量
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>次
            </span>
          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1,648
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  6
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>前面一段时间看了一篇文章，有提到每过一段时间就要对自己进行一个总结，这样才能更好地总结过去拥抱未来。我觉得很有道理，因此决定往后每年都进行一次年终总结，一是总结自己一年中的成长与得失，二是对后面的一年进行期望与规划。</p>
<h3 id="关于2018年"><a href="#关于2018年" class="headerlink" title="关于2018年"></a>关于2018年</h3><h4 id="1-技术方面"><a href="#1-技术方面" class="headerlink" title="1. 技术方面"></a>1. 技术方面</h4><p>算是打好了JavaScript的基础，并对react也进行了一个较为深入的学习，但这两者都还是需要继续努力。此外也对Angular进行了一些了解，算是对三大框架都进行了一个了解，也尝试着从开发需求的角度去思考这三大框架各自适应的开发场景，算是让自己在看待技术上转变了以往的一些思维。而在秋招后，又对Three.js进行了一些学习，看完了《Three.js入门指南》，感觉挺有意思的，算是又找到了自己感兴趣的一个技术方向。</p>
<h4 id="2-博客"><a href="#2-博客" class="headerlink" title="2.博客"></a>2.博客</h4><p>2018年算是坚持每个月都进行博客输出，总结自己在一段时间下的学习的心得与体会，自己也算是尝到了写博客带来的益处，也收获了一些小的成绩：</p>
<ul>
<li>博客的访问量上千了，并且2018年总共码了9万余字：<a href="https://srtian96.gitee.io/blog/">https://srtian96.gitee.io/blog/</a></li>
<li>掘金：<br><img src="https://images.gitee.com/uploads/images/2018/1214/225238_8c7c3e13_1575229.jpeg" alt="输入图片说明" title="Screenshot_20181214-224713.jpg"></li>
<li>简书（话说关于koa的文章好像被培训机构拿来给学生看了，阅读量蜜汁上万了）：<br><img src="https://images.gitee.com/uploads/images/2018/1214/225349_ffec87cc_1575229.jpeg" alt="输入图片说明" title="Screenshot_20181214-224842.jpg"></li>
</ul>
<h4 id="3-秋招"><a href="#3-秋招" class="headerlink" title="3. 秋招"></a>3. 秋招</h4><p>秋招对于我来说算是跌宕起伏，起初抱着很低的期望去参加秋招，想着能找个10K以上的工作就不错了。但在有意思的是最初就面了阿里，成功了完成了拿阿里练手的成就（皮一下），并很幸运的走完了流程。虽然由于各种原因没能成功，但也算建立了自信。但随后又经历了美团、百度等大厂提前批的各种挂，很郁闷。所幸到了10月份，运气好了起来，面的公司基本上都过了，最后也收获了几个offer，其中也有些不错的，最终也选择了一个自己感觉很有前景很厉害的公司，在技术栈方面也是想给自己未来多一些挑战，脱离舒适区。但话虽然是这样说，但对于未来内心还是有些忐忑，加油吧~</p>
<p>此外，通过与诸多的面试官进行交流，也有了以下的一些思考：</p>
<ul>
<li>在看待框架或一些工具的时候，可以去思考我们所需要的应用场景是怎样的，以及提前去思考当项目复杂后的通信问题、工程问题、以及可维护的问题。</li>
<li>可以去关注关注浏览器渲染性能的问题（按照阿里的那位师兄描述大部分问题都集中在W3C标准和HTTP标准中），因此不仅仅要知道怎么做，还需要去思考为什么要这样做。</li>
<li>多去思考一些栈外的东西，培养端对端的思维，建立全局意识。比如前后端的边界问题、运维、产品、设计等等。只有这样才能遇到一些需求，能够以较为全面的眼光去思考解决方案。</li>
<li>前端的未来会因为硬件与网络的提升而发生改变，未来的前端不应该只局限于写个网页这么简单，比如计算的前置、物联网、可视化，都是未来可期的东西。（所以加紧学习呀）</li>
</ul>
<h4 id="4-旅行与摄影"><a href="#4-旅行与摄影" class="headerlink" title="4. 旅行与摄影"></a>4. 旅行与摄影</h4><p>说来惭愧啊，在这两方面并没有太多可说的，2018年只去了杭州和北京，没有去什么地方，整整一年都在忙碌着，但回头看来效率却并不高。而相机一直也放在家里，没有带到学校来，因此拍的照片也数量有限，只是在一些摄影的思路上有了一些新的认识。因此在这两方面，在2019都需要做的更好才行~</p>
<h4 id="5-阅读"><a href="#5-阅读" class="headerlink" title="5. 阅读"></a>5. 阅读</h4><p>在看书方面，所看的书也是有限而分散的，并没有太多系统的阅读其他的课外书籍（也就是非技术书籍），零零散散的阅读量可能没上十本，十分惭愧，较之2017年的20来本差距有点大，在2019年必须得有所改善才行。</p>
<h3 id="对于2019年"><a href="#对于2019年" class="headerlink" title="对于2019年"></a>对于2019年</h3><h4 id="关于技术的一些期望"><a href="#关于技术的一些期望" class="headerlink" title="关于技术的一些期望"></a>关于技术的一些期望</h4><p>根据秋招得到的建议，与成为一个靠谱的合格的工程师的目标，对于技术方面我有以下的一些计划：</p>
<ul>
<li>首先努力成为一名准全栈工程师，至少将前后端给打通。（后端主要学习Node.js与python）</li>
<li>主要技术可预见的还是JavaScript和react，对这两者要加深学习</li>
<li>对设计方面与产品方面初步建立自己的方法论与知识体系</li>
<li>学习一门新的语言，初步定为Go或Java，视具体情况而定。</li>
<li>掌握Three.js，并对webGL进行学习（并将相关的计算机图形学以及数学知识掌握）</li>
<li>学习Nginx，并对其进行实践与掌握</li>
<li>弥补CSS上的一些漏洞</li>
<li>健全自己前端的知识体系，打好打牢基础。<h4 id="博客"><a href="#博客" class="headerlink" title="博客"></a>博客</h4></li>
<li>坚持写博客，每月最少输出一篇博客。</li>
<li>尝试写一些影评或者读书笔记</li>
<li>去写游记，纪录一些自己觉得很不错的，很美的地方。</li>
<li>在工作后，做好每日的工作纪录，并及时总结与思考，所得到的心得体会也需要定期进行输出总结。</li>
</ul>
<h4 id="其他："><a href="#其他：" class="headerlink" title="其他："></a>其他：</h4><ul>
<li>旅行：每月出去短途旅行一次，去逛逛北京的一些景点也行，做到工作与生活的平衡，别宅着。（也希望出国旅行一次）</li>
<li>阅读：每个月坚持阅读一本好书，用心去读，做好读书笔记。</li>
<li>健身：每天做俯卧撑，工作后尽量找到合适的健身的方式，每星期至少健身3次，保持一个健康的身体。</li>
<li>好好学英语，做到无障碍的阅读英语文章、看英语视频、写英语的文档。（毕竟英语是工程师的生产力）</li>
<li>训练自己的专注力，让自己可以在一段时间内专注于一件事情，不为外界所打扰。</li>
</ul>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/随笔/" rel="tag"># 随笔</a>
          
            <a href="/blog/tags/life/" rel="tag"># life</a>
          
            <a href="/blog/tags/年终总结/" rel="tag"># 年终总结</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2018/12/09/JavaScript数据处理之数组操作/" rel="next" title="JavaScript数据处理之数组操作">
                <i class="fa fa-chevron-left"></i> JavaScript数据处理之数组操作
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/12/29/《点石成金》读书笔记/" rel="prev" title="《点石成金》">
                《点石成金》 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/blog/images/avatar.jpg"
                alt="Srtian" />
            
              <p class="site-author-name" itemprop="name">Srtian</p>
              <p class="site-description motion-element" itemprop="description">JUST DO IT.</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">59</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">15</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">37</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://gitee.com/srtian96" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="shenruotian@gmail.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#前言"><span class="nav-number">1.</span> <span class="nav-text">前言</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#关于2018年"><span class="nav-number">2.</span> <span class="nav-text">关于2018年</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-技术方面"><span class="nav-number">2.1.</span> <span class="nav-text">1. 技术方面</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-博客"><span class="nav-number">2.2.</span> <span class="nav-text">2.博客</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-秋招"><span class="nav-number">2.3.</span> <span class="nav-text">3. 秋招</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-旅行与摄影"><span class="nav-number">2.4.</span> <span class="nav-text">4. 旅行与摄影</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5-阅读"><span class="nav-number">2.5.</span> <span class="nav-text">5. 阅读</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#对于2019年"><span class="nav-number">3.</span> <span class="nav-text">对于2019年</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#关于技术的一些期望"><span class="nav-number">3.1.</span> <span class="nav-text">关于技术的一些期望</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#博客"><span class="nav-number">3.2.</span> <span class="nav-text">博客</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#其他："><span class="nav-number">3.3.</span> <span class="nav-text">其他：</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Srtian</span>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">Site words total count&#58;</span>
    
    <span title="Site words total count">102.8k</span>
  
</div>





        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      本站访客数
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人次
    </span>
  

  
    <span class="site-pv">
      本站总访问量
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/blog/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  

  

  

  

</body>
</html>
